/*    */ package my.rummyInterface;
/*    */ 
/*    */ import java.awt.Color;
/*    */ import java.awt.Font;
/*    */ import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/*    */ import javax.swing.BorderFactory;
/*    */ import javax.swing.JCheckBox;
/*    */ import javax.swing.JLabel;
/*    */ import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
/*    */ 
/*    */ public class PanelGolpeChino extends JPanel implements ActionListener
/*    */ {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private RummyInterface principal;
	/*    */   private JCheckBox jcb1;
	/*    */   private JCheckBox jcb2;
	/*    */   private JCheckBox jcb3;
	/*    */   private JCheckBox jcb4;
	/*    */   private JCheckBox jcb5;
	/*    */   private JCheckBox jcb6;
	/*    */   private JCheckBox jcb7;
	/*    */   private JCheckBox jcb8;
	/*    */   private JCheckBox jcb9;
	/*    */   private JCheckBox jcb10;
	/*    */   private JCheckBox jcb11;
	/*    */ 
	/*    */   public PanelGolpeChino( RummyInterface principalP)
	/*    */   {
		principal = principalP;

		/* 36 */     TitledBorder borde = BorderFactory.createTitledBorder("Golpe");
		/* 37 */     borde.setTitleColor(Color.BLUE);
		/* 38 */     borde.setTitleFont(new Font("Arial", 1, 12));
		/* 39 */     borde.setBorder(BorderFactory.createEmptyBorder());
		/* 40 */     setBorder(borde);
		/*    */ 
		/* 43 */     GridLayout layout = new GridLayout(14, 1);
		/* 44 */     setLayout(layout);
		/*    */ 
		/* 47 */     this.jcb1 = new JCheckBox();
		/* 48 */     this.jcb2 = new JCheckBox();
		/* 49 */     this.jcb3 = new JCheckBox();
		/* 50 */     this.jcb4 = new JCheckBox();
		/* 51 */     this.jcb5 = new JCheckBox();
		/* 52 */     this.jcb6 = new JCheckBox();
		/* 53 */     this.jcb7 = new JCheckBox();
		/* 54 */     this.jcb8 = new JCheckBox();
		/* 55 */     this.jcb9 = new JCheckBox();
		/* 56 */     this.jcb10 = new JCheckBox();
		/* 57 */     this.jcb11 = new JCheckBox();
		/* 47 */     this.jcb1.setName("0");
		/* 48 */     this.jcb2.setName("1");
		/* 49 */     this.jcb3.setName("2");
		/* 50 */     this.jcb4.setName("3");
		/* 51 */     this.jcb5.setName("4");
		/* 52 */     this.jcb6.setName("5");
		/* 53 */     this.jcb7.setName("6");
		/* 54 */     this.jcb8.setName("7");
		/* 55 */     this.jcb9.setName("8");
		/* 56 */     this.jcb10.setName("9");
		/* 57 */     this.jcb11.setName("10");
		/* 57 */     this.jcb1.addActionListener(this);
		/* 57 */     this.jcb2.addActionListener(this);
		/* 57 */     this.jcb3.addActionListener(this);
		/* 57 */     this.jcb4.addActionListener(this);
		/* 57 */     this.jcb5.addActionListener(this);
		/* 57 */     this.jcb6.addActionListener(this);
		/* 57 */     this.jcb7.addActionListener(this);
		/* 57 */     this.jcb8.addActionListener(this);
		/* 57 */     this.jcb9.addActionListener(this);
		/* 57 */     this.jcb10.addActionListener(this);
		/* 57 */     this.jcb11.addActionListener(this);
		/* 58 */     JLabel vac = new JLabel();
		/* 59 */     JLabel vac1 = new JLabel();
		/* 60 */     JLabel vac2 = new JLabel();
		/*    */ 
		/* 63 */     add(this.jcb1);
		/* 64 */     add(this.jcb2);
		/* 65 */     add(this.jcb3);
		/* 66 */     add(this.jcb4);
		/* 67 */     add(this.jcb5);
		/* 68 */     add(this.jcb6);
		/* 69 */     add(this.jcb7);
		/* 70 */     add(this.jcb8);
		/* 71 */     add(this.jcb9);
		/* 72 */     add(this.jcb10);
		/* 73 */     add(this.jcb11);
		/* 74 */     add(vac);
		/* 75 */     add(vac2);
		/* 76 */     add(vac1);
	/*    */   }
	/*    */ 
	/*    */   public boolean isChecked(int pos)
	/*    */   {
		/* 82 */     JCheckBox box = (JCheckBox)getComponent(pos);
		/* 83 */     return box.isSelected();
	/*    */   }
	/*    */
	@Override
	public void actionPerformed(ActionEvent e) {
		JCheckBox check = (JCheckBox) e.getSource();
		if ( check.isSelected())
		{
			String string = check.getName();
			int pos = Integer.parseInt(string);
			principal.cambiarPuntajes(pos, true);
		}
		else
		{
			String string = check.getName();
			int pos = Integer.parseInt(string);
			principal.cambiarPuntajes(pos, false);
		}
	} 
}

/* Location:           C:\Users\Yank\Documents\APO\Rummy\bin\
 * Qualified Name:     my.rummyInterface.PanelGolpeChino
 * JD-Core Version:    0.6.0
 */